package hi;


import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class StatusPanel extends JPanel implements BooleanListener {

	Image activityImg;
	boolean active = true;

	public StatusPanel() {
		activityImg = new ImageIcon("resources/Glowing_Blue_Orb.png").getImage().getScaledInstance(40, 40, Image.SCALE_SMOOTH);
		setPreferredSize(new Dimension(40,40));
	}

	public void paintComponent(Graphics g) {
		if (active) {
			g.drawImage(activityImg, 0, 0, null);
		} else {
			g.clearRect(0, 0, getWidth(), getHeight());
		}
	}

	public void setActive(boolean active) {
		this.active = active;
		repaint();
	}
}